package com.redbox.RedboxManagment.dao;

import java.util.List;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.redbox.RedboxManagment.ejb.OrderStatus;

@Repository(value = "orderStatusDao")
public class OrderStatusImp extends HibernateDaoSupport implements IOrderStatus {

	@Override
	@Transactional
	public List<OrderStatus> findAll() {
		String queryString= "from OrderStatus a";
		List <OrderStatus> result = getHibernateTemplate().find(queryString);
		
		if (result.size() > 0) {
            return result;
        } else {
            return null;
        }   
	}

}
